package demo2;

import java.lang.reflect.Array;
import java.util.ArrayList;

public class StudentUtil {
    public static int GetMaxAge(ArrayList<Student> list) {
        int max = list.get(0).getAge();
        for (int i = 1; i < list.size(); i++) {
            int flag = list.get(i).getAge();
            if (flag > max)
                max = flag;
        }
        return max;
    }
}
